#include <stdio.h>
#include <curses.h>
#include <unistd.h>

/**
  * purpose: using refresh and sleep for animated effects
  * outline: initialize, draw stuff, wrap up
  */

int main() {
	int i;
	initscr();
	clear();
	for (i = 0; i < 5; i++) {		// use 5 for showing result quickly
		move(i, i+1);
		if (i % 2 == 1) {
			standout();
		}
		addstr("Hello, world");
		if (i % 2 == 1) {
			standend();
		}
		sleep(1);
		refresh();
	}
	//refresh();
	getch();
	endwin();
}
